package org.shoukaiseki.springbootdemowsdlserver.wsdl.service.impl;

import org.shoukaiseki.springbootdemowsdlserver.wsdl.config.WebServiceConfig;
import org.shoukaiseki.springbootdemowsdlserver.wsdl.service.CallService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 * com.wsdl.service.impl.CallServiceImpl
 * <br>
 *
 * @author shoukaiseki ブログ http://www.shoukaiseki.top/<br> E-メール jiang28555@Gmail.com<br>
 * @date 2022-09-13 10:32:16<br>
 */
@WebService
@Component
public class CallServiceImpl implements CallService {


    private static final Logger logger= LoggerFactory.getLogger(CallServiceImpl.class);

    /**
     *
     * @WebService | 放在接口上用于标记为webService服务接口 |
     * targetNamespace | 命名空间 |
     * name | 服务接口的名字，可不写 |
     * @WebMethod | 标记为webService服务的方法 |
     * @WebParam | 标记为webService服务的方法入参 |

     * @param token
     * @param name
     * @return
     */

    @Override
    @WebMethod
    public String createOrder(@WebParam(targetNamespace = WebServiceConfig.targetNamespace, name = "paramsJson") String paramsJson,
                              @WebParam(targetNamespace = WebServiceConfig.targetNamespace, name = "appToken") String appToken,
                             @WebParam(targetNamespace = WebServiceConfig.targetNamespace, name = "appKey") String appKey) {

        logger.debug("token={}",paramsJson);
        logger.debug("name={}",appKey);


        return "paramsJson="+paramsJson+",name="+appKey;
    }
}
